A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
The present invention generally relates to the field of object-oriented programming; and, in particular to a method and system for identifying UML objects in a repository with objects in XML content.
XML, the Extensible Markup Language, is a new format designed to bring structured information to the Web. It is a Web-based language for electronic data interchange. XML is an open technology standard of the World Wide Web Consortium (W3C), which is the standards group responsible for maintaining and advancing HTML and other Web-related standards.
XML is a sub-set of SGML that maintains the important architectural aspects of contextual separation while removing nonessential features. The XML document format embeds the content within tags that express the structure. XML also provides the ability to express rules for the structure (i.e., grammar) of a document. These two features allow automatic separation of data and metadata, and allow generic tools to validate an XML document against its grammar.
While XML is still in its infancy, there are many well-documented applications of XML. Example application domains include Web commerce, publishing, repositories, modeling, databases and data warehouses, services, financial, health care, semiconductors, inventory access, and more.
Repositories provide a central place for recording metadata and enable one to store, manage, share and reuse information about data (i.e., metadata) that an enterprise uses. A repository can store definitional, management and operational information. Tools can be integrated with the repository to support information sharing and metadata reuse, and tool and technology models may be developed to manipulate the tool information in the repository. However, the transferring of data within models from tool to tool or from a tool to the repository has been a cumbersome and unyielding task for a long time.
It is a tedious and time-consuming task to generate a format description for enabling the interchange of metadata among repositories and each different type of modeling tool available. Accordingly, there is a need for automatically generating format descriptions to expedite interchange of metadata among repositories and modeling tools. As will be described hereinbelow, this invention solves this problem by automating the production of an XML DTD for meta-models stored in a MOF-compliant repository by implementing instances of the meta-models expressible in a meta object framework. In the past, entire models would have to be replicated to accommodate minor changes.
It is an object of the present invention to provide a method for identifying UML objects in a repository with objects in XML content.
Another object of the present invention is to provide a method and system that allows modelers the ability to identify differences between object models represented in different forms.
Yet another object of the present invention is to provide a method and system that allows a user to track changes to repository objects made by an external UML editing tool.
An advantage of the present invention is the software language independence of the algorithm used to implement the method, making it flexible and portable.
Another advantage of the present invention is the process effectively allows programs to change existing models.
These and other objects, which will become apparent as the invention is described in detail below, are provided by a computer system executing a repository program, wherein a method is disclosed for identifying UML objects in the repository with objects in an XML file. The method includes the steps of parsing the XML file into XML objects and building an object tree. Next, the object tree is traversed a first time, and for each XML object found that has a name, corresponding UML objects are identified. After this, the object tree is traversed a second time, and for each XML object found that does not have a name, corresponding UML objects are then identified through Compositions and References. The method for traversing said object tree a first time includes the steps of identifying a UML object type for each XML object, and when the XML object name matches the UML object name at the current level, a UML and XML object IDs are saved in a xe2x80x98Conversionxe2x80x99 object in the memory.
Still other objects, features and advantages of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein is shown and described only the preferred embodiment of the invention, simply by way of illustration of the best mode contemplated of carrying out the invention. As will be realized, the invention is capable of other and different embodiments, and its several details are capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive, and what is intended to be protected by Letters Patent is set forth in the appended claims. The present invention will become apparent when taken in conjunction with the following description and attached drawings, wherein like characters indicate like parts, and which drawings form a part of this application.